package cheme.ProcessModel;

import java.io.Serializable;
import java.util.List;

import cheme.ProcessModel.Annotations.IAnnotation;
import cheme.ProcessModel.Visitors.IModelVisitor;
import cheme.ProcessModel.Visitors.IVisitorPatternElement;

public interface IModelElement extends IPropertyAware, Serializable, IVisitorPatternElement
{
	/**
	 * 
	 * @return the root of the elements model, a ProcessModel instance.
	 */
	IModelElement getRoot();
	
	/**
	 * 
	 * @return the parent of the model element, null if the element is the root, ProcessModel of the model.
	 */
	IModelElement getParent();
	
	List<IAnnotation> getAnnotations();
	void addAnnotation(IAnnotation annotation);
	void removeAnnotation(IAnnotation annotation);
	
	/*
	 * A return value of true indicates that the object is in an initial - 
	 * non-edited - state for which interpretation would be meaningless and error
	 * or other feedback would be misleading.
	 */
	boolean isInitial();
	
	Object accept(IModelVisitor modelVisitor);
}
